# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer:
pkgname=py3-filetype
pkgver=1.2.0
pkgrel=2
pkgdesc="infer file type and MIME from any file/buffer"
url="https://github.com/h2non/filetype.py"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-setuptools"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/h2non/filetype.py/archive/v$pkgver.tar.gz"
builddir="$srcdir/filetype.py-$pkgver"

build() {
	python3 setup.py build
}

check() {
	python3 -m unittest discover
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
	rm -rf "$pkgdir"/usr/lib/python3*/site-packages/examples
}

sha512sums="
e6116dd5505c01803c29016a8e85ce3f126c998f882eb1cfa8ff67990f560fee486d06b27dc64dbd74490f5d0f0327a9af0074e9cf1e16d3d55e71eeb2575c75  py3-filetype-1.2.0.tar.gz
"
